package com.atguigu.meinian.mapper;

import com.atguigu.meinian.pojo.Order;
import com.atguigu.meinian.vo.OrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zbystart
 * @create 2021-06-24 11:22
 */
public interface OrderMapper {
    int selectOrderByPhoneAndDateAndSetmeal(@Param("memberId") Integer memberId, @Param("date") Date date, @Param("setmealId") String setmealId);

    void insertOrder(Order order);

    Map<String, Object> selectOrderInfoAndMemberInfoAndSetmealInfoByOrderId(@Param("id") Integer id);

    List<Map<String, Object>> selectHotSetmealOrderCount(@Param("count") int count);

    Integer selectOrderCountByDate(String date);

    Integer selectTodayOrderCountByDateAndStatus(@Param("toDay") String toDay, @Param("status") Integer status);

    Integer selectOrderCountByFirstDayOfMonday(String firstDayOfMonday);

    Integer selectOrderCountByFirstDayOfMondayAndStatus(@Param("firstDayOfMonday") String firstDayOfMonday, @Param("status") int status);

    Integer selectOrderCountByFirstDayDayOfMonday(String firstDayOfMonday);

    List<HashMap<String, Object>> selectHotSetmealOrderCountAndScale(int count);


//    OrderVo selectOrderInfoAndMemberInfoAndSetmealInfoByOrderId(@Param("id") Integer id);
}
